<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Admin/Admin.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Admin</h2>
    <%
        Html.RenderError("TODO: Secure this page");%>
    <table>
        <thead>
            <tr>
                <td>
                    Username
                </td>
                <td>
                    email
                </td>
                <td>
                    Action
                </td>
            </tr>
        </thead>
        <%
            foreach (var user in ViewData["users"] as IList<User>)
            {%>
        <tr id='row-<%=user.ScreenName%>'>
            <td>
                <%=user.ScreenName%>
            </td>
            <td>
                <%=user.Email%>
            </td>
            <td>
                <%=Ajax.DeleteLink("Delete", "deleteuser", "admin", user.UserId.ToString(), "Are you sure?", "row-" + user.ScreenName)%>
            </td>
        </tr>
        <%
            }%>
    </table>

    <script type="text/javascript">
        $(document).ready(function() {
            
        });
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>
